package com.atguigu.eduservice.client;


import com.atguigu.commonutils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;



@FeignClient(name = "service-vod",fallback = VodFileDegradeFeignClient.class)
@Component
public interface VodClient {

    //定义调用的方法路径
    //根据视频id进行删除阿里云视频
    @DeleteMapping("/eduvod/video/removeAlyVideo/{id}")    //此处调用的方法必须写完全路径
    public R removeAlyVideo(@PathVariable("id") String id);  //@PathVariable注解必须指定名称，否则会出错


    //定义调用多个视频删除的方法
    //删除多个阿里云视频的方法
    //参数是多个视频id
    @DeleteMapping("/eduvod/video/delete-batch")
    public R deleteBatch(@RequestParam("videoIdList") List<String> videoIdList);


}

